package com.leo.offer;

/**
 *
 * @author xuexiaolei
 * @version 2018年03月01日
 */
public class T05PrintLinkedList {
    public static void reversePrint(Node node){
        if (node != null){
            reversePrint(node.next);
            System.out.print(node.val+" ");
        }
    }

    public static void main(String[] args) {
        Node node = Node.createNode(new int[] {1, 2, 3, 4, 5, 6});
        reversePrint(node);
    }
}
